package leetcode_401_500;

public class LeeCode_405 {
    public static void main(String[] args) {

    }
    private static String toHex(int num) {
        if (num == 0)
            return "0";
        StringBuilder sb = new StringBuilder();
        while (num != 0){
            int tmp = num & 15;
            num >>>= 4;
            if (tmp > 9){
                sb.append((char) ('a' + tmp - 10));
            }else {
                sb.append(tmp);
            }
        }
        return sb.reverse().toString();
    }
}
